// pages/donation/donation.js
Page({
  data: {
    industryarr: [],
    industryindex: 0,
    statusarr: [],
    statusindex: 0,
    jobarr: [],
    jobindex: 0,
    hasfinancing: false, //是否已融资
    isorg: false, //是否是机构
  },
  onLoad: function() {

  },

  bindPickerChange: function(e) { //下拉选择
    const eindex = e.detail.value;
    const name = e.currentTarget.dataset.pickername;
    // this.setData(Object.assign({},this.data,{name:eindex}))
    switch (name) {
      case 'industry':
        this.setData({
          industryindex: eindex
        })
        break;
      case 'status':
        this.setData({
          statusindex: eindex
        })
        break;
      case 'job':
        this.setData({
          jobindex: eindex
        })
        break;
      default:
        return
    }
  },
  setFinance: function(e) { //选择融资
    this.setData({
      hasfinancing: e.detail.value == "已融资" ? true : false
    })
  },
  setIsorg: function(e) { //选择投资主体
    this.setData({
      isorg: e.detail.value == "机构" ? true : false
    })
  },
  applySubmit: function () {
    //显示操作结果
    this.showSubmitSuccessToast();
    wx.navigateTo({
      url: '../service/service'
    })
  },
  //提交成功
  showSubmitSuccessToast: function () {
    //显示操作结果
    wx.showToast({
      title: "提交成功",
      duration: 1000,
      icon: "success"
    })
  }

})